<div class= "container">
	<h2>注册</h2>
	<div>
		<form name = "signupForm" ng-submit = "submitFunc()">
			<div name = "username" class="form-group">
				<div style="color:blue">{{signupForm}}</div>
			    <label >Name</label>
			    <input type="text" 
			    class="form-control" 
			    ng-model = "userData.username"  
			    ng-minlength = "4"
			    ng-maxlength = "16"
			    required
			    placeholder="Name">
			</div>
			<p ng-if = "(signupForm.username.$error.minlength || 
						signupForm.username.$error.maxlength) && 
						signupForm.username.$error.$touched
			" class = "error">密码长度应为4-16个字符</p>
			<div class="form-group">
			    <label >Email address</label>
			    <input type="email" class="form-control" ng-model = "userData.email" placeholder="Email">
			</div>

			<div class="form-group">
			    <label >Password</label>
			    <input type="password" 
			    class="form-control" 
			    ng-model = "userData.password" 
			    required
			    ng-minlength = "6"
			    ng-maxlength = "255"
			    placeholder="Password">
			</div>
				<p class="error" ng-if = "signupForm.password.$error.required">密码不可为空 </p>
			<div class="form-group">
			    <label >Password_confirm</label>
			    <input type="password" 
			    class="form-control" 
			    ng-model = "userData.password_confirm" 
			    required
			    ng-minlength = "6"
			    ng-maxlength = "255"
			    placeholder="Password">
			</div>
			<div class="checkbox">
			    <label>
			      	<input type="checkbox"> Check me out
			    </label>
			</div>
			  <button type="submit" class="btn btn-default">Submit</button>
		</form>

	</div>


</div>

<style type="text/css">
	.error{
		color:red;
	}
</style>